<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
	
		
		
		<title>DataTables example</title>
		
       <?
	     include SITE_ROOT.'admin/application/layouts/scripts/contents.phtml';
	   ?>
        
	</head>
    
   
   
    
    
	<body id="dt_example">
      <div class="text" >
       <?=$this->pageHeading?> 
       </div>
      
    <form method="post" name="myform" id="myform" action="<?php echo $this->url(array('controller'=>'subscription', 'action'=>'deleteplan'), 'default', true)?>" >
    
    	<div id="container" >
    
    <table width="867" height="40" cellpadding="0" cellspacing="0" border="0" style="border-top:1px solid #c4c4c4; border-left:1px solid #c4c4c4;
    border-right:1px solid #c4c4c4; " >
    
    <tr>
    <td width="865">
        
     <input type="submit" name="Delete" id="Delete" value="Delete" class="myButton"  onclick="return confirmbx();" align="right" style="margin-left:5px"  />
    
    
     <a href="<?php echo $this->url(array('controller'=>'subscription', 'action'=>'addplan'), 'default', true)?>" >
     <input type="button" name="add" id="add" value="Add Plan" class="myButton" style="margin-left:620px"  />
	</a>
        
    </td>
    </tr>
    
    </table>
    
		  <div class="demo_jui" style="margin-top:20px">
		<table width="870" border="0" cellpadding="0" cellspacing="0"  style="background-color:#FFFFFF" id="example">
           
	<thead>
		<tr >
        	<th width="107" height="38" align="center"  class="border th" style="padding-left:38px">
            <input type="checkbox" name="checkall" id="checkall" onclick="return check(this)"/>
            </th>
			<th width="126" height="38"  class=" th">Plan Name</th>
			<th width="116" align="center"  class=" th">Plan Price</th>
			<th width="163" align="center"  class=" th">No Of Images</th>
            <th width="62" align="center"  class=" th">Edit</th>
			<th width="296" align="center"  class=" th">Status</th>
		</tr>
	</thead>
	<tbody >
    
    
    
    <? for($i=0;$i<count($this->sql);$i++)
	{
		
		if($i%2==0)
		{
			?>
        <tr class="gradeA" onmouseover =this.className='tableven' onmouseout=this.style.backgroundColor='#ffffff' >
        <?
		}
		else
		{
			
		
		?>
        <tr class="gradeA" onmouseover =this.className='tableven' onmouseout=this.style.backgroundColor='#f7f7f7' >
        <? }
		?>
		
        	<td height="38"  class="border" align="center">
            
      <input type="checkbox" name="checkbox[]" id="checkbox[]" value="<?=$this->sql[$i]['plan_id']?>"  onClick="return check1();"/>
            </td>
            
			<td height="38"  class="border"><?=$this->sql[$i]['plan_name']?></td>
			<td class="border">
			
			<?
            if($sql[$i]['plan_price']>0)
			{
			   echo $this->sql[$i]['plan_price'];
			   
			}
			else
			{
				echo "Free";
			}
			?>
            </td>
			
            
            <td class="border" align="center"><?=$this->sql[$i]['nof_images']?></td>
            <td class="border" align="center">
            
            <a href=<?=APPLICATION_URL_ADMIN?>subscription/editplan/planId/<?=$this->sql[$i]['plan_id']?>>
            <img src=<?=IMAGES_URL_ADMIN?>edit.png border='0' />
            </a>
                        
            </td>
			<td class=" border" align="center">
           
		   
		   
		   
		   
		<a href="<?=APPLICATION_URL_ADMIN?>subscription/changeplanstatus/planId/<?=$this->sql[$i]['plan_id']?>/Status/<?=$this->sql[$i]['plan_status']?>">   
		   
		   <? 
		
		   if($this->sql[$i]['plan_status']==1)
		   {
			   $status=$this->sql[$i]['plan_status'];
			 ?>
			
               <img src=<?=IMAGES_URL_ADMIN?>tick.gif onClick="f1('<?=$this->sql[$i]['plan_id']?>','<?= $status?>')" />
              
			    <?
			}
			if($this->sql[$i]['plan_status']==0)
			{
				$status=$this->sql[$i]['plan_status'];
				 ?>
                  <img src=<?=IMAGES_URL_ADMIN?>cross.png onClick="f1('<?=$this->sql[$i]['plan_id']?>','<?= $status?>')" />
                  <?  
		    } 
			?>
           </a>
           
           
            </td>
			
		</tr>
		<? 
	    
	
	}
		?>
	
	</tbody>
	
</table>
			</div>
		 
		</div>
        
     
        </form>
        
	</body>
</html>